package com.bnz.staticpage.dao;


import com.bnz.staticpage.entity.TbItem;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface TbItemRepository extends JpaRepository<TbItem, Long>, JpaSpecificationExecutor<TbItem> {

    //List<TbItem> findByGoodsIdAndOrderByIsdefaultDesc(Long id);
    List<TbItem> findByGoodsId(Long id);
    List<TbItem> findByGoodsIdOrderByIsDefaultDesc(Long id);
    List<TbItem> findByGoodsIdOrderByIsDefaultAsc(Long id);

}